

set more off
mat drop _all


use "$path_data/data/temp/main_reg_data_psc.dta", clear


gen hist_gpa = .
replace hist_gpa = 0.75 if math_score == 0
replace hist_gpa = 1.75 if math_score == 1
replace hist_gpa = 2.75 if math_score == 2
replace hist_gpa = 3.75 if math_score == 3
replace hist_gpa = 4.75 if math_score == 3.5
replace hist_gpa = 5.75 if math_score == 4
replace hist_gpa = 7.25 if math_score == 5


label define psc_gpa 1 "F" 2 "D" 3 "C" 4 "B" 5 "A-" 6 "A" 7 "A+" 

label values hist_gpa psc_gpa

twoway (hist hist_gpa if treatment == 1, frac lcolor(gs12) fcolor(gs12) width(0.5)) ///
(hist hist_gpa if treatment == 0, frac fcolor(none) lcolor(black) width(0.5)), ///
legend(order(1 "Treatment" 2 "Control") pos(11) ring(0) col(1)) ///
xlabel(1(1)7, labsize(vsmall) valuelabel) xtitle("PSC Math GPA") graphregion(color(white))
graph export "$pardir/figureG1.pdf", replace as(pdf)



